﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IllustratedCsharp7_ch20_Linq
{
    class chatp20_4_4WhereClause
    {
        static void _Main()
        {
            var groupA = new[] { 3, 4, 5, 6 };
            var groupB = new[] { 6, 7, 8, 9 };

            var someInts = from int a in groupA
                           from int b in groupB
                           let sum = a + b
                           where sum >= 11   //条件1
                           where a == 4      // 条件2
                           select new { a, b, sum };
            foreach (var a in someInts)
                Console.WriteLine(a);
        }
    }
}
